from messAround.model.ali import HotAliTripModel
import messAround.util.help as util


# 阿里旅行门票
class AliTripPipeline(object):

    @staticmethod
    def process_item(item, spider):
        name = item["name"]
        return util.make_write_data({
            'category': item["category"],
            'category_id': item["category_id"],
            'category_name': item["category_name"],
            'name': name,
            'link': item["link"],
            'cover': item["cover"],
            'price': item["price"],
            'sell_count': item["sell_count"],
        }, item, HotAliTripModel)
